import ConfigParser
import logging

class ReadConfig(object):
	"""
	Handles loading and storage of values from the configuration file.
	"""
	def __init__(self):
		"""
		inits the Configparser and preps class varables for storage.
		"""
		self.config = ConfigParser.RawConfigParser()
		self.config.read('adv-backup.conf') #
		
		self.game = None
		self.src = None
		self.archiveDir = None
		self.toIgnore = None
		self.archiveType = None
		self.timeBetweenBackups = None
		self.maxAllowedBackups = None
		
		self.readContents()
		
	def readContents(self):
		"""
		Reads the contents into the class varables.
		"""
		self.game = self.config.get('Backup', 'game-name')
		self.src = self.config.get('Backup', 'source-dir')
		self.archiveDir = self.config.get('Backup', 'backup-directory')
		self.toIgnore = self.config.get('Backup', 'dir-to-ignore')
		self.archiveType = self.config.get('Backup', 'compression-type')
		self.timeBetweenBackups = self.config.get('Backup', 'time-between-backups')
		self.maxAllowedBackups = self.config.get('Backup', 'max-backups')

if __name__ == '__main__':
	pass
